﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SaunaClient.Model.Network;

namespace SaunaClient.Controller.Communication
{
    /// <summary>
    /// Communication Manager Interface
    /// </summary>
    /// <dates>
    /// 28/09/2011 - created by Chiaki Sato
    /// </dates>
    
    public interface ICommunicationManager
    {
        /// <summary>
        /// Request user account authentication to server
        /// </summary>
        /// <param name="userId">User ID</param>
        /// <param name="password">Password</param>
        /// <returns>User authentication status</returns>
        UserAuthenticationStatus AuthenticationRequest(string userId, string password);

        /// <summary>
        /// Upload a file
        /// </summary>
        /// <param name="localDirectory">Local directory</param>
        /// <param name="localFileName">File name</param>
        void Upload(string localDirectory, string localFileName, string serverDirectory);

        /// <summary>
        /// Download a file
        /// </summary>
        /// <param name="serverDirectory">Server directory</param>
        /// <param name="serverFileName">Server file name</param>
        /// <param name="localDirectory">Local directory</param>
        void Download(string serverDirectory, string serverFileName, string localDirectory);

        /// <summary>
        /// Get Server File List
        /// </summary>
        /// <param name="serverDirectory">Server directory</param>
        String GetServerFileList(string serverDirectory);

        /// <summary>
        /// Read network setting from config file
        /// </summary>
        /// <returns>NetworkSetting</returns>
        NetworkSetting ReadConfigFile();

        /// <summary>
        /// Check if client is connected server
        /// </summary>
        /// <returns>Connection Status</returns>
        bool IsConnectedToServer();

        /// <summary>
        /// Get FTP Server Directory path stting
        /// </summary>
        /// <returns>FTP Server Directory path</returns>
        string GetFtpServerDirectory();

        /// <summary>
        /// Get FTP Local Directory path setting
        /// </summary>
        /// <returns>FTP Local Directory path</returns>
        string GetFtpLocalDirectory();

    }
}
